#include <stdio.h>

int main(){
	int max=0,i=0,j=0;
	double f1=0,f2=0,f3=0;
	int xh[10],k1[10],k2[10],k3[10];
	char mz[10][5];
	while (scanf("%d %s %d %d %d",&xh[i],&mz[i],&k1[i],&k2[i],&k3[i])!=EOF){
		i++;
	}
	for ( i=0;i<10;i++ ){
		int a = k1[i]+k2[i]+k3[i];
		max = max>a?max:a;
		j 	= max==a?i:j;
		f1 += k1[i];
		f2 += k2[i];
		f3 += k3[i];
	}
	f1/=10;
	f2/=10;
	f3/=10;
	printf("%.2f %.2f %.2f\n",f1,f2,f3);
	printf("%d %s %.2f %.2f %.2f",xh[j],&mz[j],(float)k1[j],(double)k2[j],(double)k3[j]);
}
